import java.net.*;
import java.io.*;

public class client
{
 public static void main(String args[])
 {
  try
  {
   Socket s = new Socket("127.0.0.1",2009);
   InputStream is = s.getInputStream();
   PrintStream ps = new PrintStream(os);
    
   ps.println("Hello");
   DataInputStream dis = new DataInputStream(is);
   String request = dis.readLine();
   System.out.println(request);
   s.close();
  }
  
  catch(ConnectException e)
   {
   System.out.println("异常"+e);
  }
  catch(IOException ee)
  {
   System.out.println("异常"+ee);
  }
  catch(Exception eee)
  {
   System.out.println("异常"+eee);
   }
 }
}
